from Crypto.Hash import MD5,SHA
from Crypto.PublicKey import RSA


def md5Cryp(data):
    md5 = MD5.new(bytes(data,'utf-8'))
    return md5.hexdigest()

def sha1Cryp(data):
    sha1 = SHA.new(bytes(data,'utf-8'))
    return sha1


def logPass(data):
    sha1 = SHA.new(bytes(data, 'utf-8'))
    md51 = MD5.new(bytes(sha1.hexdigest(), 'utf-8'))
    return md51.hexdigest()

if __name__ == '__main__':
    a = md5Cryp('123456')
    print (a)
